﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;

namespace Data.ModelDatabase
{
    public class Basket
    {
        public Basket()
        {
            OrderPosition = new List<OrderPosition>();
        }

        [Key]
        public int Id { get; set; }

        public virtual ICollection<OrderPosition> OrderPosition { get; set; }

        public int StateValue { get; set; }

        public State State
        {
            get { return (State)StateValue; }
            set { StateValue = (int)value; }
        }

        public int UserId { get; set; }
        public virtual User User { get; set; }
    }
}
